package com.market.order.server.service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.market.common.core.domain.Result;
import com.market.order.common.domain.TOrder;
import com.market.order.common.domain.vo.VoOrder;
import com.market.order.server.service.impl.UserWrapBatchService;

/**
 * 订单Service接口
 *
 * @author market
 * @date 2024-02-26
 */
public interface ITOrderService
{
    /**
     * 查询订单
     *
     * @param orderId 订单主键
     * @return 订单
     */
    public TOrder selectTOrderByOrderId(Integer orderId);

    /**
     * 查询订单列表
     *
     * @param tOrder 订单
     * @return 订单集合
     */
    public List<TOrder> selectTOrderList(TOrder tOrder);

    /**
     * 新增订单
     *
     * @param tOrder 订单
     * @return 结果
     */
    public int insertTOrder(TOrder tOrder);

    /**
     * 修改订单
     *
     * @param tOrder 订单
     * @return 结果
     */
    public int updateTOrder(TOrder tOrder);

    /**
     * 批量删除订单
     *
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteTOrderByOrderIds(Integer[] orderIds);

    /**
     * 删除订单信息
     *
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteTOrderByOrderId(Integer orderId);

    List<TOrder> selectOrderList(VoOrder voOrder);

    Result cancel(Integer orderId);

    Result updateOrderStatus(Integer orderId, Integer orderStatus);

    Result sendMsg(String phone);

    Result addOrder(TOrder tOrder);


    Map<String, List<TOrder>> queryUserByIdBatch(ArrayList<UserWrapBatchService.Request> userReqs);
}
